<?php

require_once 'phpmoko/ui/Form/FormBase.php';

class FileButton extends FormBase
{
	private $text = null;

	function __construct()
	{
		parent::__construct();
	}
	
	function setText($text)
	{
		$this->text = $text;
	}

	function toString()
	{
		$str = '<input';

		if ($this->id != null)
			$str .= ' id="'.$this->id.'"';

		if ($this->name != null)
			$str .= ' name="'.$this->name.'"';

		if ($this->style != null)
			$str .= ' class="'.$this->style.'"';

		if ($this->text != null)
			$str .= ' value="'.$this->text.'"';
			
		$str .= ' type="file">';
			
		return $str;
	}
}
?>